package services;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.aton.db.SessionFactory;

import models.Standard;
import models.mappers.StandardMapper;
import models.mappers.WebHraDetailMapper;
import vos.HraDetailView;
import vos.HraStandardSearchVo;

public class HraStandardService {
	/**
	 * 统计行数
	 *
	 * @Title: countdetail 
	 * @param vo
	 * @return
	 * @return: long
	 */
	public static long countdetail(HraStandardSearchVo vo) {
		// TODO Auto-generated method stub
		SqlSession ss = SessionFactory.getSqlSession();
		try {
			StandardMapper mapper = ss.getMapper(StandardMapper.class);
            return mapper.countHraStandard(vo);
        } finally {
            ss.close();
        }
	}
	/**
	 * 查询列表数据
	 *
	 * @Title: listHraDetail 
	 * @param vo
	 * @return
	 * @return: List<HraDetailView>
	 */
	public static List<Standard> listHraDetail(HraStandardSearchVo vo) {
		SqlSession ss = SessionFactory.getSqlSession();
		try {
			StandardMapper mapper = ss.getMapper(StandardMapper.class);
            return mapper.listHraStandard(vo);
        } finally {
            ss.close();
        }
	}

}
